// 统一管理用户相关的接口
import request from '@/utils/request';
import type {LoginForm,LoginResponseData,UserInfoResponseData,UserMenuResponseData} from './type'
enum API{
    LOGON_URL="/signInPwd",
    USERINFO_URL="/getUserInfo",
    USER_MENU_URL="/getMenu"
}

// 暴露请求函数

//登录接口
export const signInPwd=(data:LoginForm)=>request.post<any,LoginResponseData>(API.LOGON_URL,data)

// 请求用户信息接口
export const getUserInfo=()=>request.get<any,UserInfoResponseData>(API.USERINFO_URL);

// 请求用户菜单接口
export const getUserMenu=()=>request.get<any,UserMenuResponseData>(API.USER_MENU_URL)

